package com.bishe.controller;


import com.bishe.entity.resp.PageParam;
import com.bishe.entity.resp.R;
import com.bishe.service.CommentService;
import io.swagger.annotations.Api;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Validated
@RestController
@RequestMapping("/comment")
@Api(tags = "评论")
public class CommentController {

    @Resource
    private CommentService commentService;


    @PostMapping("page")
    public R selectAll(@RequestBody PageParam pageParam) {
        return R.data(this.commentService.page(pageParam));
    }

}
